package cn.tiga.store.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class jsonResult {
    private Boolean success = true;
    private String message = "操作成功";

   //传参使用
    private Object resultObj;


    public static jsonResult me() {
        return new jsonResult();
    }

    public jsonResult setMsg(String message) {
        this.success = false;
        this.message = message;
        return this;
    }

    //将path封装到jsonResult
    public jsonResult setResultObj(Object message) {
        this.resultObj = message;
        return this;
    }
}

